unit selecaodata;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, Mask;

type
  TFormSeLData = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    MaskEdit1: TMaskEdit;
    MaskEdit2: TMaskEdit;
    BitBtn1: TBitBtn;
    GBTipo: TGroupBox;
    RBSimples: TRadioButton;
    RBCompleta: TRadioButton;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormSeLData: TFormSeLData;

implementation

uses principal;

{$R *.dfm}

procedure TFormSeLData.BitBtn1Click(Sender: TObject);
begin
        FormPrincipal.cDatai:=MaskEdit1.Text;
        FormPrincipal.cDataf:=MaskEdit2.Text;
        if rbCompleta.Checked then formPrincipal.tipoLeitura:='C'
        else formPrincipal.tipoLeitura:='S';
        Close;

end;

procedure TFormSeLData.FormShow(Sender: TObject);
begin
        if Height=142 then GbTipo.visible:=false
        else GbTipo.visible:=True;


        maskEdit1.text:=FormatDateTime('dd/mm/yy', Date);
        maskEdit2.text:=FormatDateTime('dd/mm/yy', Date);
end;

end.
